1. Technical Field
This disclosure relates to signal processing and more particularly to a method of processing an electrocardiogram signal, implemented in a dedicated device or in a microprocessor executing a software code.
2. Description of the Related Art
Electrocardiogram (ECG) signals have a peculiar morphology composed of segments, waves and complexes, as shown by way of example in FIG. 1. A single waveform starts and ends at the baseline, and two consecutive waveforms make a complex. Segments are straight isoelectric lines. Intervals are combinations of waveforms and segments. The baseline is the reference for the slope of the deflection: if the deflection is above the baseline then it is a positive deflection, otherwise it is a negative one.
The P Wave
When the action potential propagates from the sinoatrial (SA) node towards the atrioventricular (A)V node, the atria contract and a de-excitation takes place. This generates the P wave, which normally has a relatively low amplitude (100 μV) and lasts for about 100 ms. The P wave is small rounded, upright and its shape and duration may indicate an atrial enlargement.
The PR Interval
The PR interval is measured between the offset (end) of the P wave and the deflection marking the onset (start) of the QRS complex that represents the conduction of the blood through the atria to the ventricles. It lasts usually from 120 to 200 ms. An interval longer than 200 ms may indicate a first degree heart block.
The QRS Complex
QRS complexes mark the “de-excitation” of the ventricles, resulting in a wave larger than the P wave because of the larger volume of muscular tissue involved. QRS complexes usually have a “width” corresponding to a time interval of 60-100 ms, and if either side of the heart is not functioning properly this “width” may increase. Not every complex contains distinct Q, R and S waves, but any combination of these three waves is conventionally considered a QRS complex. Its importance lies in its magnitude, which is greater than that of any waveform of the ECG signal, making it ideal for a detection algorithm.
The ST Segment
The ST segment is the part of the isoelectric line included between the offset of the QRS complex and the onset of the T wave, representing the time interval between the ventricular de-excitation and its re-excitation. It usually lasts 100 ms. Distinguishing the ST segment from the T wave is often difficult, thus the ST interval is usually considered in its entirety.
The T Wave
Because the ventricular re-excitation is slower than its de-excitation, the T wave is normally wider than the QRS complex, about 200 ms, and usually has a positive deflection. Unfortunately it has a low amplitude, making sometimes difficult its detection. The shape of the T wave is very significant, as it may reveal possible coronary ischemia, hyperkalemia or acute myocardial infarction.
The QT Interval
The QT interval is measured from the onset of the Q wave to the offset of the T wave and it represents the duration of the cycle of de-excitation and re-excitation (i.e., the complete ventricular activity). It normally lasts from 300 to 450 ms, and should be about 40 percent of the interval between two R peaks (R-to-R interval).
Feature Normal Value Limit Associated Pathology
NormalFeatureValueLimitAssociated PathologyP width110ms±20 msAtrial enlargementPR interval160ms±40 msHeart block, pericarditisQRS width100ms±20 msMyocardial infarctionαQT interval400ms±40 msLong & short QT syndromeST segment100±20 msMyocardial infarctionT width200±20 msCoronary ischemia,hyperkalemiaP amplitude0.15mV±0.5 mV—QRS height1.5mV±0.5 mV—ST level0mV±0.1 mV—T amplitude0.3mV±0.02mV—
The above table shows the typical Lead II ECG features and their values for a normal sinus rhythm at a heart rate of 60 bpm in a healthy male adult. The α value for the QT interval varies with the R-to-R interval value and may be computed as α=(RR)0:5.
In a real-time monitoring environment where an automated analysis of the heart rate of a patient is performed, every possible noise source affecting the measure must be taken into account. Data corrupted with noise must either be corrected or discarded, as neither unreliable measures nor false warnings are acceptable.
There are several common noise sources affecting an ECG signal. Some of them are related to the acquisition circuit, others are power supply-dependant, finally some are caused by the patient himself:                power-line interference;        electrode loss contact noise;        motion artifacts;        muscle contractions or EMG noise;        baseline drift and amplitude modulation due to patient respiration.        
The QRS complex is by far the most important and distinctive feature for the purpose of heart rate measurement. By estimating the time interval between one R wave peak and the next one, it is easy to compute the value of the heart rate, usually indicated in terms of beat-per-minutes. The importance of the QRS complex analysis does not restrict to arrhythmia detection. The duration, amplitude and morphology of this complex is very useful also for the diagnosis of other pathologies, like conduction abnormalities, ventricular hypertrophy, myocardial infarction, electrolyte derangements and other disease states.
Most of known algorithms for QRS detection are based on feature signals obtained using first and second order derivatives of the original signals. They are characterized by a very low computational complexity but, without the aid of empiric rules to reduce the number of false detections, they tend to be very unsatisfactory in presence of noise.
Recent papers have suggested the use of more sophisticated digital alters to enhance the feature signals in the presence of noise events, and they showed much better results than the earlier ones. Lately, many modern signal processing techniques have been applied to QRS detection, and their much heavier computational complexity has resulted in a significant improvement in the algorithm's efficiency, for example through linear and non-linear altering, wavelet transforms, artificial neural networks, genetic algorithms and linear prediction.
Energy thresholding is probably the most well-known and utilized technique for QRS detection. In 1985 Jiapu Pan and Willis J. Tompkins [2] developed an algorithm for the detection of the heart rate in various environments (Holter recordings, ambulatory patients, intensive care units) to discover the presence of dangerous arrhythmias. In 1986 Pat Hamilton and Willis J. Tompkins [3] investigated the quantitative effects of a number of common elements of QRS detection rules implemented in the previous article, improving the performance of the algorithm.
All of these topics are discussed in a review article by Köhler [1].
Unfortunately, the complexity of the prior algorithms is beyond the computational limits of typical micro-controllers of low cost portable devices. Moreover, prior algorithms often make no distinction between noise peaks and R wave peaks, especially with ECG signals corrupted by noise due to motion artifacts or electrode loss contact.
The known algorithms perform poorly in presence of electromyogram (EMG) noise or in the case of electrode loss contact, scoring a noticeable amount of false alarms about patient's conditions.